package com.leo.manage_system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.leo.manage_system.entity.Picture;
import com.leo.manage_system.mapper.PictureMapper;
import com.leo.manage_system.service.PictureService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ${author}
 * @since 2021-12-23
 */
@Service
public class PictureServiceImpl extends ServiceImpl<PictureMapper, Picture> implements PictureService {
    @Autowired
    PictureMapper mapper;

    @Override
    public Picture getPictureByUrl(String url) {
        QueryWrapper<Picture> wrapper = new QueryWrapper<>();
        wrapper.eq("url", url);
        return mapper.selectOne(wrapper);
    }
}
